﻿using System;
using System.Collections.Generic;
using Budgetsch.Web.EntityModel;
using Budgetsch.Web.Services;
using GalaSoft.MvvmLight;
using System.Collections.ObjectModel;

namespace Budgetsch.ViewModels
{
    public class AddIncomeVM : IncomeDetailVMBase
    {
        public AddIncomeVM(BudgetschDomainContext context_)
            : base(context_)
        {
            Income = new Income() { StartDate = DateTime.Now.Date };
        }

        public override void Commit()
        {
            m_context.Incomes.Add(Income);
            m_context.SubmitChanges();
        }
    }
}